//第一种解法,使用indexOf循环判断
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) { 
            String str = in.next();
            String t = in.next();
            System.out.println(sub(str,t));
        }
    }

    public static int sub(String str,String t){
        int count = 0;
        int i = str.indexOf(t);
        while(i != -1){
            count++;
            i = str.indexOf(t, i + t.length());
        }
        return count;
    }
}


//第二种,使用substring截取
import java.util.*;
 public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNext()) {
            String s = in.next();
            String t = in.next();
            int ans = cut(s,t);
            System.out.println(ans);
        }
    }
     
    public static int cut(String s, String t) {
        int indexS = s.indexOf(t);
        if(indexS == -1) {
            return 0;
        }
        return 1 + cut(s.substring(indexS + t.length()),t);
    }
}



